package ua.edu.nuos.jeetraining2012.cms.service.exception;

import javax.validation.ConstraintViolation;
import java.util.Set;

public class ServiceValidationException extends Exception {

    private Set validationResult;

    /**
     * Simple exception.
     */
    public ServiceValidationException() {
        super();
    }

    /**
     * Exception
     */
    public <T extends ConstraintViolation<?>> ServiceValidationException(Set<T> validationResult) {
        super();
        this.validationResult = validationResult;
    }

    /**
     * Return Set with validation constraints
     *
     * @return Return set with ValidationConstraints
     */
    public Set getValidationResult() {
        return validationResult;
    }

}
